<%@page import="com.drerp.BI.LogicaBI"%>
<%@page import="com.drerp.BI.Clinica.LogicaClinica"%>
<%@page import="com.drerp.BI.Logistica.LogicaLogistica"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jscharts.js"></script>

<title>Divisão das Salas por Dia</title>
</head>

<body>
<div id="graph">Loading...</div>
<% LogicaBI logicaBI = new LogicaBI(); %>
<script type="text/javascript">
	
	var myChart = new JSChart('graph', 'pie');
	myChart.setDataArray([['A', <%= logicaBI.getSalasManutencao(0)%>],['B', <%= logicaBI.getSalasManutencao(1)%>],
	                      ['C', <%= logicaBI.getSalasUtilizadas(0)%>],['D', <%= logicaBI.getSalasUtilizadas(7)%>],['E', <%= logicaBI.getSalasUtilizadas(3)%>]]);
	myChart.colorize(['#00FF00','#3366FB','#0000FA','#F8CC00','#F89900']);
	myChart.setSize(600, 300);
	myChart.setTitle('Divisao das Salas por Dia');
	myChart.setTitleFontFamily('Times New Roman');
	myChart.setTitleFontSize(14);
	myChart.setTitleColor('#0F0F0F');
	myChart.setPieRadius(95);
	myChart.setPieValuesColor('#FFFFFF');
	myChart.setPieValuesFontSize(9);
	myChart.setPiePosition(180, 165);
	myChart.setShowXValues(false);
	myChart.setBackgroundImage('chart_bg.jpg');
	myChart.setLegend('#00FF00', 'Inutilizadas');
	myChart.setLegend('#3366FB', 'Manutenção');
	myChart.setLegend('#0000FA', 'Menos de 2h');
	myChart.setLegend('#F8CC00', 'Mais de 6h');
	myChart.setLegend('#F89900', 'Entre 2h e 6h');
	myChart.setLegendShow(true);
	myChart.setLegendFontFamily('Times New Roman');
	myChart.setLegendFontSize(10);
	myChart.setLegendPosition(350, 120);
	myChart.setPieAngle(30);
	myChart.set3D(true);
	myChart.draw();
	
</script>

<table border="1">
<tr>
<th>Utilização</th>
<th>Quantidade</th>
</tr>
<tr>
<td>Inutilizadas</td>
<td><%= logicaBI.getSalasManutencao(0)%></td>
</tr>
<tr>
<td>Manutenção</td>
<td><%= logicaBI.getSalasManutencao(1)%></td>
</tr>
<tr>
<td>Menos de 2h</td>
<td><%= logicaBI.getSalasUtilizadas(0)%></td>
</tr>
<tr>
<td>Mais de 6h</td>
<td><%= logicaBI.getSalasUtilizadas(7)%></td>
</tr>
<tr>
<td>Entre 2h e 6h</td>
<td><%= logicaBI.getSalasUtilizadas(3)%></td>
</tr>
</table>
</body>
</html>
